﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CommunitySystemModel;

namespace CommunitySystem.Web.Service
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IPublicOfficialSelectionService”。
    [ServiceContract]
    public interface IPublicOfficialSelectionService
    {
        [OperationContract]
        List<string> GetDengLuRenCount(int ExameID, string dangtian);
        [OperationContract]
        bool UpdatePublicOfficialInfoLocked(int id,int isLocked);
        [OperationContract]
        FileTransferStream GetExcelFile(ObservableCollection<PublicOfficialRecordModel> models, string username, Dictionary<string, bool> dic);
        [OperationContract]
        ObservableCollection<PublicOfficialSelectionModel> GetPublicOfficialSelectionForDaoChu(string tiaojian, int year, string islocked, int ExameID);

        [OperationContract]
        string ChaKanShiFouDouShenHeBaoMingRen(int year, string islocked);

        [OperationContract]
        ObservableCollection<PublicOfficialSelectionModel> GetPublicOfficialSelection(string OrgID, int ID, int start, int end, int status, int year, string islocked, int ExameID);

        [OperationContract]
        string GetOrgIDbyDengLuRen(int ID);

        [OperationContract]
        Dictionary<string, int> GetTypebyOrgID(int ID);

        [OperationContract]
        bool AddPublicOfficialSelectionModel(PublicOfficialSelectionModel item);

        [OperationContract]
        bool UpdatePublicOfficialSelectionModel(PublicOfficialSelectionModel item);

        [OperationContract]
        bool DetelePublicOfficialSelectionModel(string ID);

        [OperationContract]
        string GetOrgNamebyOrgID(int ID);

        [OperationContract]
        bool SavePublicOfficialSelectionModel(string ID);
        [OperationContract]
        int GetPublicOfficialSelectionCount(string OrgID, int ID, int status, int year, string islocked, int ExameID);
        [OperationContract]
        bool CheckPublicOfficialSelectionModel(string ID);

        [OperationContract]
        bool TuiPublicOfficialSelectionModel(string ID, string memo);

        [OperationContract]
        bool FaBuPublicOfficialSelectionModel(string ID,string fabutype);

        [OperationContract]
        string ChaKanShiFouDouShenHe(string OrgID, int year, string islocked);

        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficialRecordbyEmpID(int ID, bool isc, int nian, string islocked, int exameid);

        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficialRecordAllForDaoChu(
            string PublicOfficialSelectionID);

        [OperationContract]
        bool CancelPublicOfficialSelectionModel(string ID);

        [OperationContract]
        bool SuoPublicOfficialSelection(int ExamID);

         [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficial(int year, string islocked);
        #region 报名情况
        [OperationContract]
        int GetPublicOfficialRecordCount(int OrgID, int year, string islocked, int examid);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficialRecord(int OrgID, int start, int end, int year, string islocked, int examid);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficialRecordbyID(int ID);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficialRecordAll(int start, int end);
        [OperationContract]
        bool CheckPublicOfficialRecordModel(string ID, string type);
        [OperationContract]
        bool TuiPublicOfficialRecordModel(string ID, string memo);

        [OperationContract]
        bool UpdatePublicOfficialRecordModelFenShu(PublicOfficialRecordModel model);
        [OperationContract]
        bool BiShi(int ID);

        [OperationContract]
        bool CheXiaoBiShi(List<int> PublicOfficialRecordID);

        [OperationContract]
        bool MianShi(List<int> ID);

        [OperationContract]
        bool CheXiaoMianShi(List<int> PublicOfficialRecordID);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetFenShuPublicOfficialRecordbyEmpID(string type, int nian, string fabutype, string islocked);
        [OperationContract]
        ObservableCollection<ZhiWeiShiJianAnPaiModel> PublicOfficialSelectionForAnPai(int year, string tiaojian);
        [OperationContract]
        bool InsertZu(ZhiWeiShiJianAnPaiModel model,string type);
        [OperationContract]
        Dictionary<int, int> GetMianShiRenShu(int PublicOfficialSelectionID,int year);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetPublicOfficialRecordbyEmpIDForDaoChu(string ids,string kaoshileixing);
        [OperationContract]
        bool CancelCheckPublicOfficialRecordModel(string ID, string type);
        [OperationContract]
        bool NiTongYiorNot(List<int> PublicOfficialRecordID, string istongyi);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetShenPi(int nian, string fabutype, string islocked, string orgids);
        [OperationContract]
        bool UpdateShenPi(PublicOfficialRecordModel item);
        [OperationContract]
        ObservableCollection<ZhiWeiShiJianAnPaiModel> PublicOfficialSelectionForAnPaiSuoDing(int year, string tiaojian);
        [OperationContract]
        ObservableCollection<ZhiWeiShiJianAnPaiModel> GetOneAnPaiSuoDing(int id);
        [OperationContract]
        ObservableCollection<PublicOfficialInfo> GetPublicOfficialInfo1(int status, int year);
        [OperationContract]
        ObservableCollection<PublicOfficialRecordModel> GetMianShiTongZhiBiao(int year, string FaBuType,string mianshi);
        #endregion

        #region 通知
        [OperationContract]
        ObservableCollection<TongZhiModel> GetTongZhiModel(int year, int id);
        [OperationContract]
        bool AddTongZhiModel(TongZhiModel item);
        [OperationContract]
        bool UpdateTongZhiModel(TongZhiModel item);
        [OperationContract]
        bool DeteleTongZhiModel(int ID);

        #endregion

        #region 考官
        [OperationContract]
        ObservableCollection<KaoGuanModel> GetKaoGuanModel(string name, int id, string isadmin,string kaoguantype);
        [OperationContract]
        bool AddKaoGuanModel(KaoGuanModel item);
        [OperationContract]
        bool UpdateKaoGuanModel(KaoGuanModel item);
        [OperationContract]
        bool DeteleKaoGuanModel(string ID);

        #endregion

        #region 考官详细
        [OperationContract]
        ObservableCollection<KaoGuanModel> GetKaoGuanDetailModel(string name, int year, int id, string kaoguantype);
        [OperationContract]
        bool AddKaoGuanDetailModel(KaoGuanDetailModel item);
          [OperationContract]
        bool AddKaoGuanDetailModelBykgids(string con, string type, int zljhid);
       
        
        [OperationContract]
        bool UpdateKaoGuanDetailModel(KaoGuanDetailModel item);



        [OperationContract]
        bool UpdateKaoGuanDetailModelByids(string ids,string kgtype);
        [OperationContract]
        bool DeteleKaoGuanDetailModel(int ID);

        #endregion


        #region PublicOfficialInfo
        [OperationContract]
        ObservableCollection<PublicOfficialInfo> GetPublicOfficialInfo(string condition);

        [OperationContract]
        bool SavePublicOfficialInfo(PublicOfficialInfo entity, Files[] fs, string XamltempFile);

        [OperationContract]
        bool DeletePublicOfficialInfo(int id);

        [OperationContract]
        Emp_BasicInfoRegister GetEmp_BasicInfoRegister(string name, string idcard, int positionid);
        
        #endregion

        #region 报名岗位审核
        [OperationContract]
        int GetRegisterPositionPageCount(string condition, int pagesize);

        [OperationContract]
        ObservableCollection<RegisterPosition> GetRegisterPosition(string condition, int pageindex, int pagesize);

        [OperationContract]
        bool UpdateRegisterPosition(RegisterPosition entity);

        [OperationContract]
        bool Check(string CardNo, string Name, int status, int positionID);

        #endregion

        [OperationContract]
        bool UploadFile(string path, string filename, byte[] content, bool Isfirst);

        [OperationContract]
        ObservableCollection<Files> GetFiles(int parentid);

        [OperationContract]
        Emp_BasicInfoModel[] ValidateHasPhoto(string[] idcards, string loginUser);

        [OperationContract]
        bool UpdateHasPoto(string cardNo, bool HasPhoto, string filename);

        [OperationContract]
        bool ChechIsPublish(int id);

        [OperationContract]
        bool UploadString(string tempFile, string content, bool IsFirst);

        [OperationContract]
        DownLoadFile DownLoadFile(DownLoadFile file);
        [OperationContract]
        ObservableCollection<RenQianKaoCha> GetKaoChaQingKuang(int orgID);
        [OperationContract]
        ObservableCollection<RenQianGongShi> GetRenQianGongShi(int orgID);
        [OperationContract]
        ObservableCollection<RenQianTaoLun> GetRenQianTaoLun(int orgID);
        [OperationContract]
        bool InsertRenQianKaoCha(RenQianKaoCha model);
        [OperationContract]
        bool InsertRenQianTaoLun(RenQianTaoLun model);
        [OperationContract]
        bool InsertRenQianGongShi(RenQianGongShi model);
        [OperationContract]
        bool QueRenZhuanRen(int ids);
        [OperationContract]
        bool QueRenShenQingZhuanRen(string ids);
        [OperationContract]
        bool ShiFouYouFaBuZhiWei(int id);
        [OperationContract]
        bool ShengChengZhunKaoZheng(int exameid, string zkz);
        [OperationContract]
        ObservableCollection<LoginStatisticModel> GetDengLuRen(int ExameID, string dangtian);
        //[OperationContract]
        //FileStream ShengChengMianShiTongZhi(string EmpName);
         [OperationContract]
        ObservableCollection<RenQianQueRen> GetRenQianQueRen(int orgID);
          [OperationContract]
         bool InsertRenQianQueRen(RenQianQueRen model);

          [OperationContract]
          byte[] ExportKG(string name, int tj,string jhname);
    }
}